﻿//初始化入口
$(function() {
    fn_Tree();
});


function fn_Tree() {
    $('#treeload').tree({
    url: "Controller.aspx?controller=GeneralController&method=GetGroupRights",
        onClick: function(node) {
            $(this).tree('toggle', node.target);
            if(parseInt(node.attributes.type)==1){
                requestAjax('Controller.aspx?controller=GeneralController&method=LoadPageResultData&titleId=' + node.id, {}, function(data) {
                            $('#resultDiv').empty();
                            $('#resultDiv').load("GeneralData_resultData.aspx",{},function(){
                                $.parser.parse($('#resultDiv'));
                             });
                        });
            }else{
                $('#resultDiv').empty();
            }
        }
    });
}